package com.ruoyi.client.controller;

import com.ruoyi.client.service.IBlogHistoryService;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.web.core.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("client/user/history")
public class BlogHistoryController extends BaseController {
    @Autowired
    IBlogHistoryService historyService;

    /**
     * 删除历史记录
     * @param id
     * @return
     */
    @DeleteMapping("/{id}")
    public R<Void> delete(@PathVariable Long id) {
        historyService.removeById(id);
        return R.ok();
    }
}
